|
|
|
|
|
|
|
Figure 29.14
The Create Report Expert has several tabs, each of
which represents a step in the report-creation process. |
|
|
|
|
|
|
|
|
Even if you use the Report Expert to build your initial report layout, most likely you will want to make additional changes. Fortunately, Crystal Reports provides a myriad of options that allow you to customize a report to suit your individual needs. Although coverage of every feature of Crystal Reports is beyond the scope of this book, this chapter introduces two important concepts: adding a new field and controlling selection criteria. |
|
|
|
|
|
|
|
|
As mentioned earlier, fields are arranged on the report just as custom controls are drawn on a form. From the Insert menu, you can choose from several different types: |
|
|
|
|
|
|
|
|
Database Field. Links contents to fields in the data source, much like bound controls. |
|
|
|
|
|
|
|
|
Text Object. Provides fixed text information, such as a report title. |
|
|
|
|
|
|
|
|
Formula Field. Displays the results of a formula (expression). This may be the result of performing an operation on one or more database fields. |
|
|
|
|
|
|
|
|
Parameter Field. Allows you to specify parameters that can be passed into the report, either programmatically or manually. These parameter fields can then be used in selection criteria and other formulas. |
|
|
|
|
|
|
|
|
Special Field. Automatically shows the current page, the date and time, and other useful information. |
|
|
|
|
|
|
|
|
To add a field to your report, you simply select it from the menu and provide the necessary information to create the field. If you want to remove an existing field, select it and then press Delete. You can also right-click to open a context-sensitive menu, from which you can choose options to control field properties, such as content and formatting. |
|
|
|
|
|
|
|
|
Adding a Selection Formula |
|
|
|
|
|
|
|
|
From the Report menu, you can change the selection formula for your report. A selection formula allows you to filter the displayed records from within Crystal Reports. It works much like the WHERE clause of a SQL statement but is in a slightly different format. The Record Selection Formula dialog box allows you to filter records by selecting applicable fields and their respective selection criteria. The criteria statement is automatically |
|
|
|
|
|